<?php
namespace haibao\cms\model\data;

class SphinxDb extends Base{
	const STATUS_ENABLE = 1;
	const STATUS_DISABLE = 0;

	const TYPE_ARTICLE = 1;
	const TYPE_FEATURE = 2;
	const TYPE_IMAGE = 3;
	const TYPE_VIDEO = 4;
	const TYPE_BRAND = 5;
	const TYPE_STAR = 6;
	const TYPE_AMERICAN_DRAMA = 7;
	const TYPE_DESIGNER = 8;
	const TYPE_ARTICLE_AMERICAN = 21;
	const TYPE_IMAGE_AMERICAN = 22;
	
	const TYPE_FROM_WAP = 10;
	const TYPE_WAP_ARTICLE = 11;
	const TYPE_WAP_IMAGE = 12;

	const PUBLISH_STATUS_PC = 1;
	const PUBLISH_STATUS_MOBILE = 2;
	const PUBLISH_STATUS_PC_MOBILE = 3;
	
	public $RecordId;
	public $Title = '';
	public $Content = '';
	public $Keyword = '';
	public $Tag = '';
	public $IndexTime;
	public $ShowTime;
	public $Status;
	public $Type;
	public $Level = 0;
	public $PublishStatus = self::PUBLISH_STATUS_PC;
	public $PrimaryTagId = 0;
	public $PrimaryTagParentId = 0;
	public $TagIds = '';
	public $WeightTime;
	public $IsPcSearch = self::STATUS_DISABLE;
	
	public function __construct() {
		parent::__construct ();
		$this->intField('RecordId','RecordId',true);
		$this->stringField('Title','Title',true);
		$this->stringField('Content','Content',false);
		$this->stringField('Keyword','Keyword',false);
		$this->stringField('Tag','Tag',false);
		$this->dateField('IndexTime','IndexTime',true);
		$this->dateField('ShowTime','ShowTime',true);
		$this->dateField('WeightTime','WeightTime',true);
		$this->intField('Status','Status',true);
		$this->intField('Type','Type',true);
		$this->intField('Level', 'Level',true);
		$this->intField('PublishStatus','PublishStatus',true);
		$this->intField('PrimaryTagId','PrimaryTagId',false);
		$this->intField('PrimaryTagParentId','PrimaryTagParentId',false);
		$this->intField('IsPcSearch','IsPcSearch',true);
		$this->stringField('TagIds','TagIds',false);
		
		$this->setTableName ( 'SphinxDb' );
	}
}